<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="orderhistory.aspx.cs" Inherits="orderhistory" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<h3 id="title">Order History</h3>
    <asp:Repeater ID="rpOrder" runat="server" >
        <HeaderTemplate>
                    
        </HeaderTemplate>
        <ItemTemplate>
            <table cellpadding="10px" width="500px">
                <tr style="background-color:#e2e2e2">
                    <td>
                        <b>Ordered Date : <asp:Label ID="orderDate" runat="server" Text='<%# Eval("OrderDate") %>' /></b>
                    </td>
                <tr>
                    <td>
                        Ship Name : <asp:Label ID="shipName" runat="server" Text='<%# Eval("ShipName") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        Ship Address : <asp:Label ID="shipAddress" runat="server" Text='<%# Eval("ShipAddress") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        Ship City : <asp:Label ID="Label2" runat="server" Text='<%# Eval("ShipCity") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        Ship Via : <asp:Label ID="Label3" runat="server" Text='<%# Eval("ShipMethod") %>' />
                    </td>                                                            
                </tr>
                </tr>
                <tr>
                    <td>
                        <asp:Repeater ID="rpOderDetail" runat="server" DataSource='<%# Eval("OrderDetail") %>'>
                            <HeaderTemplate>
                                <table cellpadding="10px" width="500px">
                                    <tr>
                                        <th style="width:220px">
                                            <b><i>Product Name</i></b>
                                        </th>
                                        <th style="text-align:center">
                                            <b><i>Quantity</i></b>
                                        </th>
                                        <th>
                                            <b><i>Price</i></b>
                                        </th>
                                        <th style="text-align:center">
                                            <b><i>Total</i></b>
                                        </th>
                                    </tr>
                                </table>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <table cellpadding="10px" width="500px">
                                    <tr>
                                        <td style="width:250px">
                                            <asp:Label ID="lblProductName" runat="server" Text='<%# Eval("ProductName") %>' />
                                        </td>
                                        <td style="text-align:center">
                                            <asp:Label ID="lblQuantity" runat="server" Text='<%# Eval("Quantity") %>' />
                                        </td>
                                        <td style="text-align:center">
                                            <asp:Label ID="lblPrice" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "UnitPrice", "{0:C}") %>' />
                                        </td>
                                        <td style="text-align:center">
                                            <asp:Label ID="lblTotal" runat="server" Text='<%# "$" + DataBinder.Eval(Container.DataItem, "Total")%>' />
                                        </td>                                                                                                                        
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </asp:Repeater>                        
                    </td>
                </tr>
                <tr>
                    <td style="text-align:right; padding-right:35px">
                        Ship Price : <asp:Label ID="Label1" runat="server" Text='<%# "$" + DataBinder.Eval(Container.DataItem, "ShipPrice") %>' />
                    </td>
                </tr>
                <tr>
                    <td style="text-align:right; padding-right:35px">
                        <h4>Subtotal : <asp:Label ID="Label4" runat="server" Text='<%# "$" + DataBinder.Eval(Container.DataItem, "SubTotal") %>' ForeColor="red" /></h4>
                    </td>
                </tr> 
                <tr>
                    <td>
                        ========================================================
                    </td>
                </tr>               
            </table>            
            
        </ItemTemplate>
    </asp:Repeater>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"></asp:ObjectDataSource>

</asp:Content>

